package diShiErZhou.zuoye4.zuoye2;

public class thread2 implements Runnable{
    @Override
    public void run() {
        int i=1;
        while(i<=10) {
            System.out.println(i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            i++;
        }
    }
}
